Reimplemented authentication
More auth tests