Basic registration on server and event handling. ActiveRecord added