fixed unauthenticated sessions bug
added redirect