Fixed invalid argument exception during login