added session nonsense and sign in stuff