fix bug about 'authenticated' not showing up upon return from login call