store username and password in prefs