Moved login to client side, login works