login now works on the client