Fixed gcm messages to avoid receiving them after the user logout
Other fixes.