changed database model for user and got rid of bug creating new user