Log out if API gets an invalid_token error
Upload functionality fixes
Module upload improvements
Allow log out even when an error prevents profile data from loading