Electromagnetic locking integrated with access control systems