move login controller to separate file