fixed code style
fixed https handling and login option