refactored some username and auth stuff