updated api for /login and /users