added todo
added rubocop config and fixed style
added debug when token is missing

and added a bit more secure token generation