Created user model and tweaked some code.