Added username field and some fixes