User register and authorization in common library