Try moving everything into on_session_start()