Added feature to enable redirection from protected pages to login page. Tests included.