Add register and unregister device ID function in login and logout endpoints