added user auth (squashed commits into one)