Small glitches around login

iOS app is in a login loop because of user preferences not saving
Refactored the auth items to be stored in the db