Fixed "logged in as null" error.