Updated user model to take a shared preference instead of a context