Merged two if blocks into one as the bodies were identical
Added login\logout links as thymeleaf fragment to index. Added logout functionality to SecurityConfiguration