Added initial authentication management, still lacks some features.