Bugfix: Checking if session is valid
Adding a todo note.