handing down user creds to view and js