Added end to if statement in User controlller