Suppose a person have some bitcoins in his online wallet and he forget the password (or lose access to that online wallet in any way) then what will happen to that bitcoins?Will that be there forever or as the wallet providers have access to them and they will get them if they find no any owner for years.
You can always use the "forget password" feature or if the account was verified, prove to them that it's actually you. The online wallet that I'm using allow doing video calls, you just have to set a time with the support staff. They are really active and you can talk to different support staffs, just in case the one that you contacted before is offline.
There are also online wallets that allow you to import private keys. If you only imported the address using the private key, you don't have to worry at all since you can just create another wallet and import the same address.
When you can't do any of this, then I'm afraid that your bitcoins are lost forever. The only way for your coins to move again is when the online wallet gets hacked and all of the coins are sent to the hacker's wallet or if the online wallet you used chose to run away all the coins. Otherwise, it's there forever.