Look for several instances of "applicationName" in web.config and make sure they are all the same. Then look up the ApplicationId for this name in the aspnet_Applications table. Finally verify the accounts in the aspnet_Membership and aspnet_Users tables belong to this application.
If possible, refer to a web.config backup from when the application was known to work and look for changes. There may be several causes, but my money is on something that changed in web.config.
Roger Martin
Creator and Lead Developer of Gallery Server Pro