added all the authentication mumbo jumbo