Implemented redirection to previous url after login funtionality