refactored the layout page for login/logout using rails