Refactored a bit of code having to do with the login procedure. Need to
add priority queue to keep oadr events in memory