set the  value to function so that users are redirected to the page they entered after login