Last Seen- Function and BugFixing