Added logout button and moved flash div to be in application layout
fixed merge conflicts