Modularisation of Facebook login process