Provision for img call in returnTo (login middleware function)