moved the admin user and admin pass to environment variables, also fixed some code style issues and refactored admin_only