Fixed bug for user login