bs changes and logout bug fix