Fix for login with no user crashing the server