Your comments

Thanks for your response. yes the folder is writable. This is interesting. I would guess stepping through the code may reveal a file having been interrupted or something during a process is causing the application to revert to the logon screen. just a guess.

Yes it does. I reinstalled the raspbian and then did a fresh install of Ubooquity and it worked. After setting up and then trying to rescan my book directory it started sending me back to the login page everytime i clicked a link again.