Fixed some issues to get sessions to actually work