changed state_machine in standard.rb, remade auth_helper