login fix to enable both usrname:psswd and cookie