handle back button on login modal