fixed bug when username field is empty in URL