fixed login bug - user sometimes appears as null