getRequest() is deprecated in version 2.4

removed $this->getRequest() and added it as a parameter to be passed to loginAction() method