make authentication as a separate method