Fixing redirect loop on session expiration, and some other stuff