Added validation for user names
Corrected indentaion