extract menu directive, cleanup login page