refactors application.erb into login/out layouts