Capabilities and JS problem fixed

Fixed capabilities problem which caused login errors. JS call was
placed in appropriate block so it doesn’t cause error.
Disable logging

Logging raises an error in Chrome, so it is disabled