fixed error on User.authorize method
fixed login procedure