implemented authentication and session system, closes #3