Fix write to session when user is guest on /sso/login
Added tests