bug fixed when using  username and password