BS-7249, fix link for admin page and simplify code.