added functionality for logout, showing a user profile, and adding posts