implemented login on all pages