Removed double code in auth process