Ensures user is properly redirected back