Bug fixes and implemented session tokens