adding some more checks for login, modified login url