Lots of changes. Almost done authentication