Small cleanup, and also fixes login redirect

Card: analytics 1360