some house cleaning, and fixed a bug that caused a redirection loop if a user was not signed in