fixing authentication and adding username setting