Added support for custom login and error pages