Fix logging in, restrict access to pages only to logged users