Modify login procedure