Refactored router logic
Added user model and saving of user to DB