store successful login credentials in user preferences