Login fixed

Fixed login (no not always raises valueerror)