Fixed app to login/logout correctly