Init fixes v1

This is the merged branch containing `t_init_token`, `t_login`, `t_init_pin` and `t_set_pin`.

It also contains some fixes related to these features that were added to each related commit.

Please, review it.