separate authentication code in a dir