Added logout button and application controller