fixed the login view loading twice