login-related stuff should only affect login page

other misc. cleanup