implemented on join and utility function to send a message if not logged in.