Login protection

Now players will not be able to get attacked or damaged when they login after certain seconds.
This and the other change in this file do not belong to this pull request. Please remove that commit.