Authentication handling added