Added many unit tests for User model.