added more advanced auth