Adding saving users to database functionality