Now will redirect to previous page after login.