Now setting "back" variable to properly redirects after the login