fixed bugs. Added model for users