Add user authentication

 As of now, it works fine on python 2, but I dont have a clue what's going on in python 3. If someone can point out what went wrong, I can fix it.