Implemented sessions and redirects.