I think this is something, that #authenticate should already do for you.