Created a showLogin, doLogin and a logout function to authorize users to either create a new post, update or edit if they are an authorized user.