refactored directory structure; auth flow