refactored code for authentication (no longer using basic authentication), added functionality for logging in/out, and adding images to blog posts