Fixed the login to pref bug