WP-4712 Modified login process to fit into new restricted pages functionality