How to get Sans Phase 2 and 3

Sans has 3 phases, which are all unlocked separately.

How to get Phase 2: You can get phase 2 by beating Judgment Hall with sans. Beating it rewards you with a badge, and gives you the ability to switch to phase 2.

How to get Phase 3: You can get phase 3 by walking behind certain pillars and finding a door hidden behind them. This door has a 1/5 chance to spawn every 5 minutes, and is a one person thing. After getting Phase 3, you can activate it by pressing M while in Phase 2