Refacto auth

1 job for dev in 2 minutes and 39 seconds