Could not log in; restarted MacBook Air; icons exchanged position; Got a login warning at my iPhone
Sometimes things unexpectedly happen and won't occur again. The alert on your iPhone was probably related to iMessage communicating with Apple's servers after the restart in an odd way and not something to worry about if it happened right at that time.


  A box appears asking if I want to open the applications that were open before the computer restarted because of a problem


This happens whenever an unexpected or forced shutdown occurs, and is to prevent the cause of the shutdown from reappearing if it's an application, etc.

You can reorder the icons in the menu bar by holding the command key and dragging them to the appropriate location.

Spotlight indexing also sometimes occurs after a restart. Unless it is completely losing your indexed state (which would take a long while to reindex!), then this is also expected behavior.



If you're worried about the computer, then restart it and see that it restarts smoothly. If it does, I would take no further action unless it happens again.