Added all the necessary auth code
Got authentication all completely working