Login and Logout redirection

See commits for details

addresses #186 and #193