Added auth function to simplify code even more :D