Adds home template and resolves login redirection