Made changes to users_controller. Tests are not working properly while site works fine when tested manually.