Updated the mod_login layout to detect the menu Itemid for registration, password reset and password remind links.