adding user model and various tweaks