Moved authentication SQL stuff to auth/repository