Creating authentication methods and some minnor changes