Username, password validation updated

Reformatted, removed some code. Slightly better.