Condensed authentication into 2 methods.