updated login in controller