Adds logout and session logic to application index