Added login & logout functions. May need to extend this to permission groups at some point, but this should handle a personal blog just fine.